﻿#if WINDOWS_PHONE
using System;

using Microsoft.Phone.Tasks;

namespace Outcoder.LauncherModel
{
	public class ChooserAdapter<T> where T : TaskEventArgs
	{
		readonly ChooserBase<T> chooser;

		public ChooserAdapter(ChooserBase<T> chooser)
		{
			this.chooser = ArgumentValidator.AssertNotNull(chooser, "chooser"); ;
		}

		public event EventHandler<T> Completed
		{
			add
			{
				chooser.Completed += value;
			}
			remove
			{
				chooser.Completed -= value;
			}
		}

		public void Show()
		{
			chooser.Show();
		}
	}
}
#endif